<?php if (count($product_newest) > 0) :?>
<div id="featured_products">
    <h4>Sản phẩm hot nhất</h4>
    <div class="block_content">
        <ul>
            <?php foreach($product_hot as $key => $value) :?>
            <li class="ajax_block_product">
                <h5><a class="product_link" href="<?php echo base_url('san-pham/'.$value['product_id'].'_'.url_friendly($value['title']));?>.html" title="<?php echo $value['title'];?>"><?php echo $value['title'];?></a></h5>
                <a class="product_image" href="<?php echo base_url('san-pham/'.$value['product_id'].'_'.url_friendly($value['title']));?>.html" title="<?php echo $value['title'];?>"><img width="170" height="170" onerror="ImgError(this);" src="<?php echo base_url().'/uploads/thumbs/'.$value['avatar']; ?>" alt="<?php echo $value['title'];?>" /></a>
                <div>
                    <span class="price"><span>Giá: </span>
                    <?php echo ($value['price_new']) ? currency_format($value['price_new']) : currency_format($value['price_old']);?> VND</span>
                    <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_1" href="#" title="Add to cart">Thêm vào giỏ</a>
                    <a class="button" href="<?php echo base_url('san-pham/'.$value['product_id'].'_'.url_friendly($value['title']));?>.html" title="View">Xem</a>
                </div>
            </li>
            <?php endforeach;?>
        </ul>
    </div>
</div>
<?php endif;?>